package com.bangdream.michelia.view.adapter;


import android.text.Html;
import android.widget.ImageView;

import com.bangdream.michelia.R;
import com.bangdream.michelia.entity.TeacherBean;
import com.bangdream.michelia.utils.ImageLoadUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

/**
 * Created by zhouyi on 2018/3/25.
 */

public class EliteAdapter extends BaseQuickAdapter<TeacherBean,BaseViewHolder> {
    public EliteAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, TeacherBean item) {
        ImageLoadUtils.ImageLoad(mContext,item.getFaceUrl(),(ImageView) helper.getView(R.id.ivLogo),-1);

        helper.setText(R.id.tvName,item.getName()+"");
        helper.setText(R.id.tvDescribe,Html.fromHtml(item.getContent()==null?"":item.getContent()));
    }
}
